Completed
Push — master ( dc6b63...48675a )
by
unknown
02:10
created

plugin.js ➔ ... ➔ before   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
c 1
b 0
f 1
nc 1
nop 1
dl 0
loc 8
rs 9.4285
1
var chai = require('chai');
2
3
var config = require('../src/cli').config
4
config.set({root: __dirname + '/fixtures'})
0 ignored issues
show
Compatibility introduced by
Consider using the path module for constructing paths since they are otherwise not cross-OS compatible.
Loading history...
5
6
var abeExtend = require('../src/cli').abeExtend;
7
var Plugins = require('../src/cli').Plugins;
8
var Manager = require('../src/cli').Manager;
9
var fse = require('fs-extra');
10
11
describe('Plugin', function() {
12
  before( function(done) {
13
    Manager.instance.init()
14
      .then(function () {
15
        this.fixture = {}
16
        done()
17
        
18
      }.bind(this))
19
  });
20
21
  /**
22
   * abeExtend.plugins.instance
23
   * 
24
   */
25
  it('abeExtend.plugins.instance.getRoutes()', function() {
26
    var routes = abeExtend.plugins.instance.getRoutes()
27
    chai.expect(routes[0].get).to.have.length(1);
28
  });
29
30
  /**
31
   * abeExtend.hooks.instance.trigger
32
   * 
33
   */
34
  it('abeExtend.hooks.instance.trigger', function() {
35
    var res = abeExtend.hooks.instance.trigger('afterEditorInput')
36
    chai.assert.equal(res, 'test', 'Hook test failed !')
37
  });
38
});
39